Skip to content

👷 Prevent GH-actions from running when unrelated changes are made#1384

Closed
justin-p wants to merge 9 commits intofastapi:masterfrom
justin-p:added_paths_ignore_on_actions
Closed

👷 Prevent GH-actions from running when unrelated changes are made#1384
justin-p wants to merge 9 commits intofastapi:masterfrom
justin-p:added_paths_ignore_on_actions

Conversation

@justin-p
Copy link
Copy Markdown
Contributor

@justin-p justin-p commented Oct 3, 2024

This change effectively prevents a playwright or a backend test from running when you for example update a README.md file.

Currently when updating certain files that do not effect the outcome of tests in anyway will trigger Actions to run regardless. To prevent unneeded credits being used or charges being made when this template is used on private repositories certain files have been added as a paths-ignore on relevant actions.

@justin-p justin-p marked this pull request as draft October 4, 2024 22:21
@justin-p justin-p marked this pull request as ready for review October 4, 2024 22:27
@YuriiMotov

This comment was marked as resolved.

@YuriiMotov YuriiMotov changed the title Prevent actions from running when unrelated changes are made 👷 Prevent actions from running when unrelated changes are made Sep 4, 2025
@YuriiMotov YuriiMotov changed the title 👷 Prevent actions from running when unrelated changes are made 👷 Prevent GH-actions from running when unrelated changes are made Oct 9, 2025
Copy link
Copy Markdown
Member

@YuriiMotov YuriiMotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

All path lists are identical.
I checked that all files exist and that it makes sense to ignore them

@YuriiMotov
Copy link
Copy Markdown
Member

I think we can also ignore frontend/** for backend linting.
Anything else?

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has a merge conflict that needs to be resolved.

@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Dec 26, 2025
@tiangolo
Copy link
Copy Markdown
Member

Thanks for the interest! But this would mean that the entire thing is skipped, and then it wouldn't pass if it's a required check before merging.

This would need a combination of another action to filter paths changed (instead of the builtin logic) combined with alls-green at the end, I think I did something like that for some parts in FastAPI, don't remember exactly.

For now I'll pass on this one, but thanks! ☕

@tiangolo tiangolo closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts Automatically generated when a PR has a merge conflict internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants